home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacPerl 4.1.3 / lib / bigint.pl < prev    next >
Encoding:
Perl Script  |  1993-10-23  |  7.4 KB  |  15 lines  |  [TEXT/MPS ]

  1. package bigint;
  2.  
  3. # arbitrary size integer math package
  4. #
  5. # by Mark Biggar
  6. #
  7. # Canonical Big integer value are strings of the form
  8. #       /^[+-]\d+$/ with leading zeros suppressed
  9. # Input values to these routines may be strings of the form
  10. #       /^\s*[+-]?[\d\s]+$/.
  11. # Examples:
  12. #   '+0'                            canonical zero value
  13. #   '   -123 123 123'               canonical value '-123123123'
  14. #   '1 23 456 7890'                 canonical value '+1234567890'
  15. # Output values always always in canonical